#include <stdio.h>

int main(int argc, char **argv)
{
	int i, temp;
	int blank;
	int input, cycle;
	char c;

	scanf("%d %c", &input, &c);

	for(i=1, cycle=0; 1; i+=2)
	{
		cycle += i;
		if(2*cycle-1 > input)
			break;
	}
	
	i -= 2;
	cycle = temp = i;
	while(temp != -1)
	{
		blank = (cycle - temp)/2;
		for(i = 0; i < blank; i++)
			printf(" ");

		for(i = 0; i < temp; i++)
			printf("%c", c);

		printf("\n");
		temp -= 2;
	}

	temp = 3;
	while(temp != cycle+2)
	{
		blank = (cycle - temp)/2;
		for(i = 0; i < blank; i++)
			printf(" ");

		for(i = 0; i < temp; i++)
			printf("%c", c);

		printf("\n");
		temp += 2;
	}

	printf("%d\n", input - ((1+cycle)*(cycle+1)/2-1));
	return 0;
}